package com.jichaoyun.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jichaoyun.common.model.PagedResult;
import com.jichaoyun.model.entity.FlowMonth;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.Map;

/**
* @author zhen
* @description 针对表【flow_month】的数据库操作Service
* @createDate 2023-11-24 10:31:07
*/
public interface IFlowMonthService extends IService<FlowMonth> {

    /**
     * 单用户年报表，导出到Excel
     * @param station_no
     * @param year
     * @param response
     * @throws IOException
     */
    void getUserYearDataExcel(Integer station_no, Integer year,HttpServletResponse response)  throws IOException;


    /**
     * 单用户任意区间年报表
     * @param station_no
     * @return
     */
    Map<String, Object> getStationYearPeriodForm(Integer station_no, LocalDateTime start,LocalDateTime end);

    /**
     * 单用户某年年报表
     * @param station_no
     * @param year
     * @return
     */
    Map<String, Object> getStationYearForm(Integer station_no, Integer year);

    /**
     * 对比上月与前月用气量
     * @param station_no
     * @return
     */
    Map<String,Float> getMonthSteamComparison(Integer station_no);


    /**
     * 对比去年同上月份用气量
     * @param station_no
     * @return
     */
    Map<String,Float> getSameMonthSteamComparison(Integer station_no);

    /**
     * 分页查找多用户的月报表
     * @param theDay
     * @param pageNo
     * @return
     */
    PagedResult getMultiStationMonthFormPage(LocalDateTime theDay, Integer pageNo);

    /**
     * 导出多用户月报表到Excel
     * @param theDay
     * @param response
     * @throws IOException
     */
    void getMultiStationMonthForm(LocalDateTime theDay, HttpServletResponse response) throws IOException;


    /**
     * 根据站号查找某个站的月报表
     * @param theDay
     * @param stationNo
     * @return
     */
    Map<String, Object> getMultiStationMonthFormByStation(LocalDateTime theDay, Integer stationNo);

    /**
     * 获取多用户的年报表
     * @param theDay
     * @param pageNo
     * @return
     */
    PagedResult getMultiStationYearFormPage(LocalDateTime theDay, Integer pageNo);

    /**
     * 导出多用户年报表到Excel
     * @param theDay
     * @param response
     * @throws IOException
     */
    void getMultiStationYearForm(LocalDateTime theDay, HttpServletResponse response) throws IOException;

    /**
     * 修改月结算数据字段
     * @param theDay
     * @param flow
     * @return
     */
    Integer updateMultiStationMonthFlowSettle(LocalDateTime theDay, Float flow, Integer stationNo);

    /**
     * 同比月分页查找
     * @param theDay
     * @param pageNo
     * @return
     */
    PagedResult getMultiStationTBMonthFormPage(LocalDateTime theDay, Integer pageNo);

    /**
     * 多用户信息-获取月度同比分析表
     * @param theDay
     * @param stationNo
     * @return
     */
    Map<String, Object> getMultiStationTBMonthFormByStation(LocalDateTime theDay, Integer stationNo);
}
